<script type="text/javascript">
    function call(url){
        var term =document.getElementById("pilih");
        //document.location.href=url+'/'+term.value;
        document.location.href=url+term.value;
    }
</script>
<?php if (!empty($courses)) { ?>

<div id="bingkaiforumatas"> 
	<div id="bingkiri">
		<div id="alamat2">Schedule:</div>
		<h1 class="heading1">Class Schedule | <?php echo $courses['courses_name']['kode_pelatihan']; ?>-<?php echo $courses['courses_name']['angkatan']; ?></h1>
		<div id="alamat"><?php echo $courses['courses_name']['nama_pelatihan']; ?>, Angkatan <?php echo $courses['courses_name']['angkatan']; ?> </div>
	</div>
	<div id="bingkanan">
	</div>
	<div class="clear"></div>
</div>
<div id="bingkaiforum">
	<div id="puma">
            <?php 
                echo $this->load->view("portal/course_nav");
            ?>
	</div>
	<div id="halaman">
	</div>
	<div class="clear"></div>
	<div>
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="scheweek2">
		<tr>
			<td id="class2" class="yup">Session</td>
			<td id="tag" class="yup">Date</td>
			<td id="jam" class="yup">Jam</td>
			<td id="topic" class="yup">Topic</td>
			<td id="ins" class="yup">Instructor</td>
			<td id="sta" class="yup">Status</td>
		</tr>
		<tr>
			<td class="yep"></td>
			<td class="yep"></td>
			<td class="yep"></td>
			<td class="yep"></td>
			<td class="yep"></td>
			<td class="yep"></td>

		</tr>
                <?php foreach ($courses['courses_list'] as $row) { ?>
		<tr>
			<td><a href="" class="wal2">Sesi <?php echo $row['nomor_sesi']; ?></a></td>
			<td><?php echo date("d-F-Y", strtotime($row['tanggal'])); ?></td>
			<td><?php echo $row['jam_mulai']."-".$row['jam_selesai']; ?></td>
			<td><?php echo $row['judul_sesi']; ?></td>
			<td>
                            <?php for($i=0;$i<count($row['list_pengajar']);$i++){
                                    echo $row['list_pengajar'][$i]['nama'];
                                    if($i+1!=count($row['list_pengajar'])) echo ', ';
                            }?>
                        </td>
			<td><?php echo $row['status']; ?></td>
		</tr>
                <?php }?>
	</table>

	</div>
</div>
<?php }?>